Carbon


DMSetDisplayMode

Header: Displays.h Carbon status: Supported

Sets the display mode and pixel depth for a video device.

OSErr DMSetDisplayMode (
    GDHandle theDevice, 
    UInt32 mode, 
    UInt32 *depthMode, 
    UInt32 reserved, 
    Handle displayState
);
Parameter descriptions
theDevice

A handle to the GDevice structure for the video device whose display mode and pixel depth you wish to set.

mode

The number used by a video device to identify its display mode. If you supply the value 0 in this parameter, DMSetDisplayMode uses the current display mode. To specify another display mode, use the function DMNewDisplayModeList.

depthMode

A pointer to the desired pixel depth for the video device specified by theDevice. If you pass a pointer to 0, DMSetDisplayMode attempts to keep the current depth. If you pass a pointer to 1, 2, 4, 8, 16, or 32, DMSetDisplayMode attempts to set the device to use your specified pixel depth. If you supply a pointer to a value of 128 or greater, then DMSetDisplayMode sets the depth to the depth mode represented by the Video Depth Mode values. See “Video Depth Mode Values” for more information.

On return, this parameter contains a pointer to the new pixel depth. This value represents the depth mode closest to the one you requested when calling DMSetDisplayMode.

reserved

Reserved for future expansion. Pass NULL in this parameter.

displayState

If your application called DMBeginConfigureDisplays, you must pass the displayState handle obtained. Otherwise pass NULL in this parameter.

function result

A result code.

SPECIAL CONSIDERATIONS

Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)